<?php
namespace Media\Component;
use Doctrine\ORM\EntityManager;
/**
 * CountryServcie
 *
 */
class AbstractComponent
{
    protected  $em;
    protected  $entity;

    public function __construct(EntityManager $em)
    {
        $this->em = $em;
    }
	
	public function getByCreatedAt($createdAtStart, $createdAtEnd)
	{
		$entities = $this->em->getRepository($this->entity)->getByCreatedAt($createdAtStart, $createdAtEnd);
		return  $entities;
	}
	
	public function getByModifiedAt($modifiedAtStart, $modifiedAtEnd)
	{
		$entities = $this->em->getRepository($this->entity)->getByModifiedAt($modifiedAtStart, $modifiedAtEnd);
		return  $entities;
	}
}
